﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VolunteerActivitieList.aspx.cs" Inherits="ZHDJ.PersonalCenter.Module.VolunteerService.VolunteerActivitieList" %>

<!DOCTYPE html>

<html>
<head runat="server">
    <title></title>
    <style type="text/css">
       
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"></f:PageManager>
        <f:Panel ID="Panel1" runat="server" BodyPadding="5px"
            ShowBorder="false" Layout="VBox" BoxConfigAlign="Stretch"
            BoxConfigPosition="Start" ShowHeader="false" Title="志愿活动管理">
            <Items>
                <f:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                    ShowBorder="false">
                    <Rows>
                        <f:FormRow ID="FormRow1" runat="server">
                            <Items>
                                <f:TextBox ID="txtTitle" runat="server" EmptyText="请输入活动主题" LabelWidth="70px" LabelAlign="Right" Label="活动主题" MaxLength="20"></f:TextBox>
                                <f:DropDownList ID="ddlType" runat="server" Label="查看" LabelAlign="Right" LabelWidth="70px">
                                    <f:ListItem Text="本组织的活动" Value="0" />
                                    <f:ListItem Text="我参与的活动" Value="1" />
                                </f:DropDownList>
                                <f:Button ID="btnSearch" runat="server" Text="搜索" OnClick="btnSearch_Click" Icon="SystemSearch"></f:Button>
                            </Items>
                        </f:FormRow>
                    </Rows>
                </f:Form>
                <f:Grid ID="Grid1" runat="server" BoxFlex="1" ShowBorder="true" ShowHeader="false"
                    EnableCheckBoxSelect="true" DataKeyNames="ID" AllowSorting="true"
                    OnSort="Grid1_Sort" SortField="Title" SortDirection="DESC" AllowPaging="true"
                    IsDatabasePaging="true" OnPreDataBound="Grid1_PreDataBound"
                    OnPageIndexChange="Grid1_PageIndexChange">
                    <PageItems>
                        <f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
                        </f:ToolbarSeparator>
                        <f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数：">
                        </f:ToolbarText>
                        <f:DropDownList ID="ddlGridPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlGridPageSize_SelectedIndexChanged" runat="server">
                            <f:ListItem Text="10" Value="10"></f:ListItem>
                            <f:ListItem Text="20" Value="20"></f:ListItem>
                            <f:ListItem Text="50" Value="50"></f:ListItem>
                            <f:ListItem Text="100" Value="100"></f:ListItem>
                        </f:DropDownList>
                    </PageItems>
                    <Columns>
                        <f:RowNumberField />
                        <f:BoundField DataField="Title" SortField="Title" ExpandUnusedSpace="true" HeaderText="活动主题" />
                        <f:BoundField DataField="BeginTime" SortField="BeginTime" HeaderText="活动开始时间" Width="120px" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" />
                        <f:BoundField DataField="EndTime" SortField="EndTime" HeaderText="活动结束时间" Width="120px" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" />
                        <f:TemplateField Width="100px" HeaderText="参与人员">
                            <ItemTemplate>
                                <asp:Label ID="lbBranch" runat="server" Text='<%#GetPeopleCount(Eval("ID")) %>'></asp:Label>
                            </ItemTemplate>
                        </f:TemplateField>
                        <f:BoundField DataField="IsEndName" SortField="IsEnd" HeaderText="是否结束" Width="80px" TextAlign="Center" />
                        <f:BoundField DataField="ServiceTime" SortField="ServiceTime" HeaderText="服务时长" Width="80px" TextAlign="Center" />
                        <f:TemplateField Width="100px" HeaderText="查看详情" TextAlign="Center">
                            <ItemTemplate>
                                <a target="_blank" href='/Portal/VolunteerActivitie/VolunteerActiviteDetail.aspx?ID=<%#Eval("ID") %>'>查看详情</a>
                            </ItemTemplate>
                        </f:TemplateField>
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>
    </form>
</body>
</html>
